<!--物价证照-->
<style scoped lang="less">
  .r-txt {
    text-align: right;
    width:75%;
  }
</style>

<template>
  <div class="contain">
    <div class="text-list mb30">
      <li class="displayflex">
        <span class="l-txt flex1">招标类型</span>
        <input v-bind:readonly="viewOnly" class="r-txt" value="政府招标价">
      </li>
      <li class="displayflex">
        <span class="l-txt flex1">招标地区</span>
        <input v-bind:readonly="viewOnly" class="r-txt" value="湖北省武汉市江汉区">
      </li>
      <li class="displayflex">
        <span class="l-txt flex1">商品名称</span>
        <input v-bind:readonly="viewOnly" class="r-txt" value="十五项遗传性耳聋相关基因检测试剂盒">
      </li>
      <li class="displayflex">
        <span class="l-txt flex1">包装单位</span>
        <input v-bind:readonly="viewOnly" class="r-txt" value="盒">
      </li>
      <li class="displayflex">
        <span class="l-txt flex1">医保编号</span>
        <input v-bind:readonly="viewOnly" class="r-txt" value="10000028273">
      </li>
      <li class="displayflex">
        <span class="l-txt flex1">招标日期</span>
        <input v-bind:readonly="viewOnly" class="r-txt" value="2018-07-10">
      </li>
      <li class="displayflex">
        <span class="l-txt flex1">有效期</span>
        <input v-bind:readonly="viewOnly" class="r-txt" value="2020-7-10">
      </li>
      <li class="displayflex">
        <span class="l-txt flex1">价格</span>
        <input v-bind:readonly="viewOnly" class="r-txt" value="22.50元">
      </li>
      <li class="displayflex">
        <span class="l-txt flex1">年</span>
        <input v-bind:readonly="viewOnly" class="r-txt" value="2020">
      </li>
      <li class="displayflex">
        <span class="l-txt flex1">期</span>
        <input v-bind:readonly="viewOnly" class="r-txt" value="282">
      </li>
      <li class="displayflex">
        <span class="l-txt flex1">页</span>
        <input v-bind:readonly="viewOnly" class="r-txt" value="1">
      </li>
      <li class="displayflex">
        <span class="l-txt flex1">备注</span>
        <input v-bind:readonly="viewOnly" class="r-txt" value="备注信息备注信息">
      </li>
    </div>

    <uploader :title="'物价表封面'" :img-list="imgListFM" :max="max"></uploader>
    <uploader :title="'物价表内页'" :img-list="imgListNY" :max="max"></uploader>
  </div>
</template>

<script>
import uploader from '@/components/share/imageUploader/imageUploader.vue';
export default {
  name: 'Price',
  components: {
    uploader,
  },
  data() {
    return {
      viewOnly: true,
      imgListFM: [],
      imgListNY: [],
      max:9,
    };
  },
  watch: {
  },
  computed: {
    userinfo(){
      return localStorage.getItem('userinfo') === null?null:JSON.parse(localStorage.getItem('userinfo'));
    }
  },
  created() {
    this.SetPageType();
    this.GetData();
  },
  mounted() {
    this.$nextTick(function() {
    });
  },
  methods: {
    GetData(){
      let args1 = JSON.parse('["/File/Index/L3VwbG9hZHMvMjAxODA1L2JkNTFjNWRiMWM5MzQ4MGY5NmNiMjgxMTgwMmU1OTkz"]'),
          args2 = JSON.parse('["/File/Index/L3VwbG9hZHMvMjAxODA1L2VhYmJkM2I4NjgwZDQ0YTI4YWI0ZTEyOTkwMjRmZWFm"]');
      args1.forEach(x => {
        if(x){
          this.imgListFM.push(x);
        }
      });
      args2.forEach(x => {
        if(x){
          this.imgListNY.push(x);
        }
      });
    },



    SetPageType(){
      if(this.viewOnly){
        this.max = 0;
      }
    }
  }
}
</script>
